package com.wsl.tibet_provider.service.impl;

import com.wsl.pojo.Tb_brand;
import com.wsl.tibet_provider.dao.Tb_brandDao;
import com.wsl.service.Tb_brandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Tb_brandServiceimpl implements Tb_brandService {
    @Autowired
    private Tb_brandDao tb_brandDao;

    //查出品牌的所有
    @Override
    public List<Tb_brand> findallBrand() {
        return tb_brandDao.selectList(null);
    }

    //品牌的增加
    @Override
    public void interdbrand(Tb_brand tb_brand) {
        tb_brandDao.insert(tb_brand);
    }

    //品牌的删除
    @Override
    public void deletebrand(Integer id) {
        tb_brandDao.deleteById(id);
    }

    //品牌的修改
    @Override
    public void update(Tb_brand tb_brand) {
        tb_brandDao.updateById(tb_brand);
    }
}
